package cn.ljy.uem.model;

import cn.ljy.common.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @description 年级类
 * @author ljy
 * @date 2022-7-6 10:05
 */
@ApiModel(value="年级")
@Data
@NoArgsConstructor
public class SchoolGrade extends BaseModel {
    private Integer id;

    @ApiModelProperty(value = "年级名称")
    @NotBlank(message = "名称不能为空")
    @Length(min = 2, max = 30, message = "名称长度必须在 {min} - {max} 之间")
    private String name;

    @ApiModelProperty(value = "年级的排序级别")
    @NotNull(message = "级别不能为空")
    private Integer sort;
}
